home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / BillBoot.sit / Bill Boot / source code / BillBootScri.c < prev    next >
C/C++ Source or Header  |  1997-06-27  |  548b  |  37 lines

  1. /*
  2.     File:        WinBootINIT.c
  3.     
  4.     Contains:    INIT loader mechanism for the winboot hack.
  5.  
  6.     Written by:    Eric Traut
  7.  
  8.     Date:        6/25/97
  9.  
  10. */
  11.  
  12. #include <Resources.h>
  13. #include <Memory.h>
  14.  
  15. typedef void ResourceMainProc(void);
  16.  
  17. void
  18. main(void)
  19. {
  20.     Handle                codeResource;
  21.     ResourceMainProc*    mainEntry;
  22.     
  23.     codeResource = Get1Resource('WnBt', 500);
  24.     if (codeResource == NULL)
  25.         DebugStr("\pCode resource not found");
  26.     
  27.     DetachResource(codeResource);
  28.     
  29.     MoveHHi(codeResource);
  30.     HLock(codeResource);
  31.     
  32.     mainEntry = (ResourceMainProc*)*codeResource;
  33.     (*mainEntry)();
  34. }
  35.  
  36.  
  37.